package com.asman.vr

import androidx.annotation.Keep
import java.io.Serializable


/**
 *    author : ybk
 *    date   : 2019-07-25 16:19
 *    desc   :
 */
@Keep
data class BaseJSBridgeData(
    val code: String? = "10000",
    val msg: String? = null
//    val result: Any? = null
)

@Keep
data class BaseJSBridgeDataT<T>(
    val code: String? = "10000",
    val msg: String? = null,
    val result: T? = null
)

@Keep
data class UserInfoRes(
    val userName: String? = null,
    val mobile: String? = null,
    val token: String? = null,
    val userId: Long? = null
)

@Keep
data class ShareInfoRes(
    val shareTitle: String?,
    val shareDesc: String?,
    val shareImage: String?,
    val shareLink: String?
)

@Keep
data class ShareMiniProgramInfo(
    val shareTitle: String?,
    val shareDesc: String?,
    val shareImage: String?,
    val shareLink: String?,
    val schemeId: Long?//设计师ID，打点要用
)

@Keep
data class JumpToNativeViewParam(val appUrl: String)

@Keep
data class TopNavigationBarParam(val isHidden: Int = 0)//isHidden：1隐藏，0显示


@Keep
data class DecorateDetailParamOut(val decorationInfo: DecorateDetailParam?)

/**
 * 跳转到报价单的需要的参数
 */
@Keep
data class DecorateDetailParam(
    val schemeId: Long?,
    val workId: Long?,
    val hotspots: Map<String, String>?
)

/**
 * 换搭分享中转页面需要的参数
 */
@Keep
data class SharePageViewParam(
    val buildingArea: Int?,
    val buildingName: String?,
    val groupId: String?,
    val houseParamStr: String?,
    val mainPic: String?,
    val name: String?,
    val schemeId: Long?,
    val workId: Long?,
    val style: String?,
    val vrType: Int?,
    val shareTitle: String?//分享的文案
) : Serializable


/**
 * 设计师店铺
 */
@Keep
data class DesignerDetailParam(
    val designerId: Long?
)

@Keep
data class GoodsDetailParam(
    val skuId: Long?
)

/**
 * 保存本地变量
 */
@Keep
data class SaveLocalDataParam(
    val key: String,
    val value: String
)


@Keep
data class CallAppTrtc(
    val type: String?,//joinRoom:加入房间，leaveRoom：离开房间
    val params: Param?
) {
    @Keep
    enum class CallAppTrtcType(name: String) {
        joinRoom("joinRoom"),
        leaveRoom("leaveRoom"),
    }

    @Keep
    data class Param(
        val sdkAppId: Int?,
        val userId: String?,
        val roomId: Int?,
        val userSig: String?
    )
}

@Keep
data class NotifyTrtcH5<T>(
    val type: String,//onRemoteUserEnterRoom有用户加入当前房间，onRemoteUserLeaveRoom表示离开房间
    val params: T
) {
    @Keep
    enum class NotifyTrtcH5Type(name: String) {
        onRemoteUserEnterRoom("onRemoteUserEnterRoom"),
        onRemoteUserLeaveRoom("onRemoteUserLeaveRoom"),
    }

    @Keep
    data class UserEnterRoom(
        val userId: String
    )

    @Keep
    data class UserLeaveRoom(
        val userId: String,
        val reason: Int//离开原因，0表示用户主动退出房间，1表示用户超时退出，2表示被踢出房间。
    )
}

